package com.example.demo.day.config.learn.design.design.x1;

public class mainTest {

    public static void main(String[] args) {
        Context context = new Context(8,5);
        System.out.println("加： " + context.execute());

        context.setStrategy(new SubtractionStrategy());
        System.out.println("减： " + context.execute());

        context.setStrategy(new MultiplyStrategy());
        System.out.println("乘： " + context.execute());

        context.setStrategy(new DivisionStrategy());
        System.out.println("除： " + context.execute());

        context.setStrategy(new RemainStrategy());
        System.out.println("取余： " + context.execute());
    }
}
